<?php
/**
 * @brief join_check_id protocol
 *
 * @param post uid User ID
 * @return True/False
 * @author con100 <con100@playplus.net>
 * @since 05/04/2013
 * @copyright Copyright (c) 2013, PlayPlus
 **/
include 'dbconn.php';

$user_id = mysql_real_escape_string($_POST['uid']);

$sql = "select id from ebs_member where id='$user_id'";
$res = mysql_query($sql);
$data = mysql_num_rows($res);

if($data > 0){
	$result = array("Result"=>FALSE);
}
else{
	$result = array("Result"=>TRUE);
}
echo json_encode($result);
/*
header('Content-type: text/xml; charset=UTF-8');

$writer = new XMLWriter();
$writer->openMemory();
$writer->setIndent(true);
$writer->setIndentString('  ');
$writer->startDocument('1.0', 'UTF-8');

$writer->startElement('join_check_id');
	$writer->startElement('result');
	$writer->text($result);
	$writer->endElement();
$writer->endElement();

echo($writer->outputMemory());
*/
?>